import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    method: false,
    tokenPower: false,
    openAside: false,
    power: 0,
    filter: {},
    tableData: [
      {
        id: 0,
        date: '1988-03-15 07:09',
        title: 'Xrbhdrcgk Keaphrg Ioagnlagl Nfhdisl Mjbl Qxicr',
        author: 'Carol',
        importance: 1,
        readings: 2950,
        status: 1
      },
      {
        id: 1,
        date: '1988-03-15 07:09',
        title: 'Dxoyhj Zbkxw Ifldvsqxx Hxnlkiti Mclugh',
        author: 'Anthony',
        importance: 2,
        readings: 4259,
        status: 2
      },
      {
        id: 2,
        date: '2006-10-10 11:09',
        title: 'Abnbqpkg Htrdzyuqx Lljrgbw Won Nqmssm Lcyu',
        author: 'Sarah',
        importance: 2,
        readings: 423,
        status: 1
      },
      {
        id: 3,
        date: '1981-07-28 06:16',
        title: 'Uxlgtw Nfsl Sjw Xpskdskjo Tbofyywm Xmgoc Cxo Ysmabyytb',
        author: 'Maria',
        importance: 3,
        readings: 3327,
        status: 1
      },
      {
        id: 4,
        date: '1997-12-14 20:32',
        title: 'Etyznfbb Rucrxd Nekrcgkt Yfhugjbj Ogdjwjxpq Thqamopcnc Dmvwmm Dqj Dcqgochqkt',
        author: 'Shirley',
        importance: 3,
        readings: 4906,
        status: 2
      },
      {
        id: 5,
        date: '1986-08-17 07:16',
        title: 'Smiecpu Ybeyd Jjv Eqlflctgq Gqjhigjsm Squftcwt Fcdasf Eghntgk Snlifhtqy Fdfb',
        author: 'Nancy',
        importance: 2,
        readings: 4764,
        status: 2
      },
      {
        id: 6,
        date: '2009-08-08 13:26',
        title: 'Derhfit Huvvwdq Bpefxqe Dajjsr Kmfmul Byujvv',
        author: 'Sandra',
        importance: 3,
        readings: 1087,
        status: 2
      },
      {
        id: 7,
        date: '1999-03-10 23:09',
        title: 'Tox Nyozuzfid Iumlax Jcejrpr Qegx Tssvhjr Ysrtmqgwm Ftfggawtu Cbqshno Uosvacg',
        author: 'Thomas',
        importance: 1,
        readings: 860,
        status: 2
      },
      {
        id: 8,
        date: '1972-03-18 03:04',
        title: 'Jewix Ajahwcnf Qbchxnfb Cdvs Qigfj Ckhhipfb Plsyn',
        author: 'Brian',
        importance: 3,
        readings: 2963,
        status: 1
      },
      {
        id: 9,
        date: '1990-11-13 08:55',
        title: 'Cxl Jwyuokihm Ceaeymqyf Fbmofmfa Vjte Omltqrbes Paskycy',
        author: 'Steven',
        importance: 2,
        readings: 1073,
        status: 2
      }
    ]
  },
  mutations: {
    isOpenAside(state, open) {
      state.openAside = open
    },
    changePower(state, num) {
      state.power = num
    },
    saveFilterData(state, data) {
      state.filter = data
    },
    changeMethod(state, method) {
      state.method = method
    }
  },
  actions: {
  },
  getters: {
  }
})
